home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 December / PCWorld_2006-12_cd.bin / domacnost a kancelar / rainlendar / Rainlendar-Lite-2.0.exe / scripts / hotkeys.lua < prev    next >
Text File  |  2006-08-27  |  1KB  |  50 lines

  1. --
  2. -- DO NOT EDIT THIS FILE. IT WILL BE OVERWRITTEN WHEN YOU UPGRADE RAINLENDAR!
  3. -- If you want to add new hotkeys put the scripts to another file and prefix
  4. -- the functions with "Hotkey_".
  5. --
  6. -- When the hotkey is displayed in the options window the "Hotkey_"-prefix is 
  7. -- stripped from string as well as all '_'-chars. The names of the hotkeys can
  8. -- also be localized.
  9. --
  10.  
  11. function Hotkey_Next_Month()
  12.   Global_ShowMonth("+1")
  13. end
  14.  
  15. function Hotkey_Previous_Month()
  16.   Global_ShowMonth("-1")
  17. end
  18.  
  19. function Hotkey_Hide_Windows()
  20.   local listWindows = Rainlendar_GetWindows()
  21.   for key, value in pairs(listWindows) do
  22.     Rainlendar_HideWindow(value)
  23.   end
  24. end
  25.  
  26. function Hotkey_Show_Windows()
  27.   local listWindows = Rainlendar_GetWindows()
  28.   for key, value in pairs(listWindows) do
  29.     Rainlendar_ShowWindow(value)
  30.   end
  31. end
  32.  
  33. function Hotkey_Toggle_Windows()
  34.   local visible = false
  35.   listWindows = Rainlendar_GetWindows()
  36.   for key, value in pairs(listWindows) do
  37.     visible = visible or Rainlendar_IsWindowVisible(value)
  38.   end
  39.   
  40.   if visible then
  41.     Hotkey_Hide_Windows()
  42.   else
  43.     Hotkey_Show_Windows()
  44.   end
  45. end
  46.  
  47. function Hotkey_Refresh()
  48.   Rainlendar_Refresh()
  49. end
  50.